package com.bank.user.controller;

import com.bank.model.vo.user.*;
import com.bank.user.service.ListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/3/30 14:18
 */
@RestController
@RequestMapping(value = "/user/list")
public class ListController {
    @Autowired
    ListService listService;

    @GetMapping("/employee")
    public List<EmployeeVo> getEmployeeVo(){
        return listService.getEmployeeVo();
    }
    @GetMapping("/user")
    public List<UserVo> getUserVo(){
        return listService.getUserVo();
    }
    @GetMapping("/deposit")
    public List<DepositListVo> getDepositListVo(){
        return listService.getDepositListVo();
    }
    @GetMapping("/loan")
    public List<LoanListVo> getLoanListVo(){
        return listService.getLoanListVo();
    }
    @GetMapping("/position/distribution")
    List<PositionDistributionVo> getPositionDistribution(){
        return listService.getPositionDistribution();
    }
    @PostMapping("/info/basic")
    List<UserBasicInfoVo> getUserBasicInfoVo(@RequestBody String roleName){
        return listService.getUserBasicInfoVo(roleName);
    }
}
